package edu.sctu.practice.class02.xuqianlan.test.test18;

/**
 * Created by lenovo on 2015/10/29.
 */
public class Car extends Auto {
    public int tire;
    public String color;
    public int weight;
    public int speed;
    public boolean airconditioner;
    public boolean CD;

    public Car(int tire, int weight, String color, int speed, boolean CD) {
        super(tire, weight, color, speed);
        this.tire = tire;
        this.weight = weight;
        this.color = color;
        this.speed = speed;
        this.CD = CD;

    }

    public void upSpeed() {
        speed += 10;
       System.out.println("加速后汽车的速度为：" + speed + "km/h");

    }

    public void downSpeed() {
        speed -= 10;
        System.out.println("减速后汽车的速度为：" + speed + "km/h");
    }

}
